﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;   

namespace ProfileHelper
{
    internal static class Log
    {
        static string LastMessage = "";

        internal static void Write(string Value, params object[] args)
        {
            Value = string.Format(Value, args);
            string NewText = Value + "\n";

            // Stop re-post's
            if (LastMessage == Value) return;
            LastMessage = Value;

            fLog._Instance.MainLog.SelectionColor = Color.White;
            fLog._Instance.MainLog.AppendText(NewText);

            fLog._Instance.MainLog.SelectionStart = fLog._Instance.MainLog.TextLength;         //scroll to the caret
            fLog._Instance.MainLog.ScrollToCaret();
        }
    }
}
